import request from '@/utils/request'

//  登录
export async function login(data: object) {
  return request({
    url: '/api/destroyer/will/auth/login',
    method: 'POST',
    data,
  })
}

//  获取用户信息
export function getUserInfo() {
  return request({
    url: '/api/sczx/user/authentication/getAuthUserBaseInfoDetail',
    method: 'POST',
  })
}

//   登出
export function logout() {
  return request({
    url: '/logout',
    method: 'GET',
  })
}
//  注册
export function register(data: any) {
  return request({
    url: '/api/sczx/user/userBaseInfo/create',
    method: 'POST',
    data,
  })
}

//  修改密码
export function updatePassword(data: any) {
  return request({
    url: '/api/sczx/user/userBaseInfo/modifyPwsBySelf',
    method: 'POST',
    data,
  })
}
